package conf;

import java.util.Properties;

import cn.zye.msa.util.BaseActivity;


public class CameraConf {

	private static Properties props = null;

	public static String getParam(String paramName) throws Exception {
		if (props == null)
			props = PropertyConfigParser.loadConfigFile(BaseActivity.CachePath+"/camera.property");
		return props.getProperty(paramName);
	}
	
	public static String getCameras() {
		String str = "";
		try {
			str = getParam("Cameras");
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return str;
	}
	
	public static String getCameraids() {
		String str = "";
		try {
			str = getParam("Cameraids");
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return str;
	}
	
	public static String getCameraid(String name,String tmp){
		String str = "";
		try {
			str = getParam(name,tmp);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return str;
	}
	
	public static String getParam(String paramName,String temp) throws Exception {
		props = PropertyConfigParser.loadConfigFile(temp);
		return props.getProperty(paramName);
	}
	
	public static String getCamerasInfo(String info) {
		String str = "";
		try {
			str = getParam(info);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return str;
	}
	
}
